Optimal. Leaf size=145 \[ \frac{4}{3} a x^2 \sin \left (\frac{x}{2}\right ) \cos \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{8}{3} a x^2 \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{32}{3} a x \sqrt{a \cos (x)+a}-\frac{224}{9} a \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{32}{27} a \sin ^2\left (\frac{x}{2}\right ) \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.144266, antiderivative size = 145, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, Rules used = {3319, 3311, 3296, 2637, 2633} \[ \frac{4}{3} a x^2 \sin \left (\frac{x}{2}\right ) \cos \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{8}{3} a x^2 \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{32}{3} a x \sqrt{a \cos (x)+a}-\frac{224}{9} a \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}+\frac{32}{27} a \sin ^2\left (\frac{x}{2}\right ) \tan \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3319
Rule 3311
Rule 3296
Rule 2637
Rule 2633
Rubi steps
\begin{align*} \int x^2 (a+a \cos (x))^{3/2} \, dx &=\left (2 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int x^2 \cos ^3\left (\frac{x}{2}\right ) \, dx\\ &=\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)}+\frac{4}{3} a x^2 \cos \left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)} \sin \left (\frac{x}{2}\right )+\frac{1}{3} \left (4 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int x^2 \cos \left (\frac{x}{2}\right ) \, dx-\frac{1}{9} \left (16 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int \cos ^3\left (\frac{x}{2}\right ) \, dx\\ &=\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)}+\frac{4}{3} a x^2 \cos \left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)} \sin \left (\frac{x}{2}\right )+\frac{8}{3} a x^2 \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )+\frac{1}{9} \left (32 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin \left (\frac{x}{2}\right )\right )-\frac{1}{3} \left (16 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int x \sin \left (\frac{x}{2}\right ) \, dx\\ &=\frac{32}{3} a x \sqrt{a+a \cos (x)}+\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)}+\frac{4}{3} a x^2 \cos \left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)} \sin \left (\frac{x}{2}\right )-\frac{32}{9} a \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )+\frac{8}{3} a x^2 \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )+\frac{32}{27} a \sqrt{a+a \cos (x)} \sin ^2\left (\frac{x}{2}\right ) \tan \left (\frac{x}{2}\right )-\frac{1}{3} \left (32 a \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int \cos \left (\frac{x}{2}\right ) \, dx\\ &=\frac{32}{3} a x \sqrt{a+a \cos (x)}+\frac{16}{9} a x \cos ^2\left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)}+\frac{4}{3} a x^2 \cos \left (\frac{x}{2}\right ) \sqrt{a+a \cos (x)} \sin \left (\frac{x}{2}\right )-\frac{224}{9} a \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )+\frac{8}{3} a x^2 \sqrt{a+a \cos (x)} \tan \left (\frac{x}{2}\right )+\frac{32}{27} a \sqrt{a+a \cos (x)} \sin ^2\left (\frac{x}{2}\right ) \tan \left (\frac{x}{2}\right )\\ \end{align*}
Mathematica [A] time = 0.241013, size = 54, normalized size = 0.37 \[ \frac{2}{27} a \sqrt{a (\cos (x)+1)} \left (\left (45 x^2-328\right ) \tan \left (\frac{x}{2}\right )+\cos (x) \left (\left (9 x^2-8\right ) \tan \left (\frac{x}{2}\right )+12 x\right )+156 x\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.088, size = 0, normalized size = 0. \begin{align*} \int{x}^{2} \left ( a+a\cos \left ( x \right ) \right ) ^{{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.98863, size = 97, normalized size = 0.67 \begin{align*} \frac{1}{27} \,{\left (81 \, \sqrt{2} a x^{2} \sin \left (\frac{1}{2} \, x\right ) + 12 \, \sqrt{2} a x \cos \left (\frac{3}{2} \, x\right ) + 324 \, \sqrt{2} a x \cos \left (\frac{1}{2} \, x\right ) - 648 \, \sqrt{2} a \sin \left (\frac{1}{2} \, x\right ) +{\left (9 \, \sqrt{2} a x^{2} - 8 \, \sqrt{2} a\right )} \sin \left (\frac{3}{2} \, x\right )\right )} \sqrt{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \cos \left (x\right ) + a\right )}^{\frac{3}{2}} x^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]